package com.wkbb.sports.enums;

public enum SportsHomeContentEnum {

    HOME_WORK(1,"作业",100),
    HOME_REPORT(2,"报告",100),
    HMOE_CHALLENGE(3,"挑战",80),
    HOME_ORDER(4,"排行榜",60),
    HOME_COURSE(5,"课程",40),
    HOME_GUIDE(6,"引导",20);

    private SportsHomeContentEnum(Integer code, String desc, Integer value) {
        this.code = code;
        this.desc = desc;
        this.value = value;
    }

    private Integer code;

    private String desc;

    private Integer value;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(String code) {
        for (SportsHomeContentEnum sportsHomeContentEnum : SportsHomeContentEnum.values()) {
            if (sportsHomeContentEnum.getCode().equals(code)) {
                return sportsHomeContentEnum.getDesc();
            }
        }
        return null;
    }

    public static Integer getValue(String code) {
        for (SportsHomeContentEnum sportsHomeContentEnum : SportsHomeContentEnum.values()) {
            if (sportsHomeContentEnum.getCode().equals(code)) {
                return sportsHomeContentEnum.getValue();
            }
        }
        return null;
    }
}
